package cn.dnui_lf_705.dnui_16110100705.service;

import java.util.List;

import cn.dnui_lf_705.dnui_16110100705.bean.CommentBean;
import cn.dnui_lf_705.dnui_16110100705.bean.GetAllUserCollectionBean;
import cn.dnui_lf_705.dnui_16110100705.bean.ResultBean;
import cn.dnui_lf_705.dnui_16110100705.bean.UserBean;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

public interface UserService {
    @GET("userLogin.do")
    Call<UserBean> userLogin(@Query("username") String username, @Query("userpass") String userpass);

    @GET("userRegister.do")
    Call<ResultBean> doregister(@Query("username") String username, @Query("userpass") String userpass,
                                @Query("mobilenum") String mobilenum, @Query("address") String address,
                                @Query("comment") String comment);
    @GET("userCollectFood.do")
    Call<ResultBean> userCollectFood(@Query("user_id") String user_id, @Query("food_id") String food_id);

    @GET("userCollectShop.do")
    Call<ResultBean> userCollectShop(
            @Query("user_id") String user_id,
            @Query("shop_id") String shop_id
    );
    @GET("getAllUserCollection.do")
    Call<List<GetAllUserCollectionBean>> getAllUserCollection(@Query("user_id") String user_id, @Query("flag") int flag);

    @GET("getUserById.do")
     Call<UserBean> getUserById(@Query("user_id") String user_id);

    @GET("updateUserById.do")
    Call<ResultBean> updateUserById(@Query("user_id") String user_id, @Query("username") String username, @Query("userpass") String userpass, @Query("mobilenum") String mobilenum, @Query("address") String address);

    @GET("insertComment.do")
    Call<ResultBean>insertComment(@Query("item_id") String item_id, @Query("content") String content);

    @GET("getAllOrdersByUser.do")
    Call<List<CommentBean>>getAllOrdersByUser(@Query("user_id") String user_id);
    @GET("getAllCommentsByUser.do")
    Call<List<CommentBean>>getAllCommentsByUser(@Query("user_id") String user_id);
    @GET("uodateComment.do")
    Call<ResultBean>updateComment(@Query("order_id") int order_id, @Query("content") String content);
    @GET("deleteComment.do")
    Call<ResultBean>deleteComment(@Query("order_id") int order_id);
}
